import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'Home',
      redirect: '/recommed',
      children: [
        {
          path: '/recommed',
          name: 'Recommed',
          component: () => import('@renderer/views/recommed/index.vue'),
          meta: {
            path: '/recommed',
            back: false
          }
        },
        {
          path: '/play_list_detail',
          name: 'playListDetail',
          component: () => import('@renderer/views/play-list-detail/index.vue'),
          meta: {
            path: '/recommed',
            back: true
          }
        },
        {
          path: '/rank_list',
          name: 'rankList',
          component: () => import('@renderer/views/rank-list/index.vue'),
          meta: {
            path: '/recommed',
            back: true
          }
        },
        {
          path: '/new_music',
          name: 'newMusic',
          component: () => import('@renderer/views/new-audio/index.vue'),
          meta: {
            path: '/recommed',
            back: true
          }
        },
        {
          path: '/choice',
          name: 'Choice',
          component: () => import('@renderer/views/choice/choice.vue')
        }
      ]
    }
  ]
})

export default router
